package com.woniu.woniuYoga.comm.core.exception;

import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * @author: 付宽成
 * @description: WoniuJsonException
 * @date: 2020/8/25 11:16
 * @version: 1.0
 */

@Data
@EqualsAndHashCode(callSuper = false)
public class WoniuJsonException extends WoniuException{
    private static final long serialVersionUID = 1L;
    private Integer code;

    public WoniuJsonException(Integer code, String message) {
        super(code, message);
        this.code = code;
    }

    public WoniuJsonException(WoniuExceptionCode code) {
        super(code);
        this.code = code.getCode();
    }
}
